<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="../taglibs.jsp" %>
<%@taglib prefix="staticResource" tagdir="/WEB-INF/tags/header" %>
<staticResource:staticResource></staticResource:staticResource><style type="text/css">
<title><fmt:message key="application.title"/></title>
b{color: #666;}
</style>
</head>
<body class="easyui-layout">
    <div data-options="region:'north',border:false" style="height:32px;background:#FFF;padding:0px">
	    <div class="navBox">
	     <table height="100%">
		    <tr>
			  <td><img src="${ctx}/static/images/home/icon0.png" /></td><td>${set.sysName}&gt;&gt; 系统管理&gt;&gt; 系统日志</td>
			</tr>
		 </table>
	    </div>
    </div>  
    <div data-options="region:'center',title:''" style="overflow-x:hidden;padding: 5px;">  
       <div id="toolbar" style="padding:3px">
	       	<div>
				<a href="#" class="easyui-linkbutton" iconCls="icon-clear" plain="false" onclick="deleteAll()">清空日志</a>
			</div>
	   </div>  
      <div style="float: left;width: 100%; height:auto;padding: 2px">

            <div style="float: left;width:100%; height:100%;margin-top: 5px;">
                 
				<table id="dg" >  
				   
				</table>   
       
            </div>
       </div>
       
    </div>  
    

</body>

<!-- 实时数据加载 -->
<script type="text/javascript">
$(function(){
	// 获取浏览器窗口 
	var windowScreen = document.documentElement;
	var h=windowScreen.clientHeight;
	$('#dg').datagrid({
        url: '${ctx}/system/operateLog/list',
        height: (h-50),
        width: "100%",
		nowrap : true,
		autoRowHeight : true,
		striped : false,
		collapsible : false,
		fitColumns : true,
		remoteSort : false,
		pagination : true,//显示分页 
        toolbar:$("#toolbar"),
        rownumbers:true,
        columns: [[
      			   { field: 'operateLogId', title: 'operateLogId', width: 10,hidden:true},
           	       { field: 'operateMethod', title: '操作方法', width: 20, align:'left'},
      			   { field: 'operateParams', title: '请求参数', width: 10,align:'center'},
      			   { field: 'operateDescription', title: '操作描述', width: 20, align:'left'},
      			   { field: 'operateIp', title: '操作IP', width:10, align: 'center'},
      			   { field: 'operateCreateBy', title: '操作人', width:10, align: 'center'},
      			   { field: 'operateCreateTime', title: '操作时间', width:10, align: 'center'}
      			 ]]
	});
});
//deleteAll
function deleteAll() {
				$.messager.confirm('提示', '确认清空所有系统所有操作日志吗?', function(r) {
					if (r) {
						$.post('${ctx}/system/operateLog/deleteAll', function(
								response) {
							$.messager.show({
								title : response.title,
								msg : response.msg,
								timeout : response.timeout,
								showType : response.showType
							});
							$('#dlg').dialog('close');
							$('#dg').datagrid('reload');
						}, 'json');
					}
				});					
			}
//search
function doSearch(){
	$('#dg').datagrid('load', {    
	}); 
}

</script>


</html>
